var currlist

function markCurrent(ele) {
    // remove class "current" from all elements and apply it to ele
    // from http://stackoverflow.com/questions/195951/change-an-elements-css-class-with-javascript
    var elems = document.getElementsByTagName('*'), i;
    for (i in elems) {
        /* doens't work in opera or IE < 10, see 
        https://developer.mozilla.org/en-US/docs/DOM/element.classList
        if( elems[i].classList.contains('current')) {
            elems[i].classList.remove('current')
        } */
        if((' ' + elems[i].className + ' ').indexOf(' current') > -1) {
            //console.log('before:"' + elems[i].className + '"')
            elems[i].className = elems[i].className.replace( ' current' , '' )
            //console.log('after:"' + elems[i].className + '"\n')
        }
    }
    // now add it back onto the current element and make sure this shows:
    ele.className += ' current'
    
    // now sort menu foldedness:
    /*
    try {
        currlist.style.display = 'none'
    } catch(err) {}
    currlist = ele.parentNode.parentNode // a->li->ul
    currlist.style.display = 'block'
    */
    return true // so that we actually follow the link
}